-- GENERATED SPELL FOR [Onu'zun] --


function spell0_30180(pUnit, Event) --@Cone of Cold,Self--
pUnit:FullCastSpellOnTarget(15244,pUnit)
pUnit:RegisterEvent('Sorts_30180', 8257, 1)
end

function spell1_30180(pUnit, Event) --@Counterspell,n/a--
pUnit:FullCastSpellOnTarget(15122,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30180', 15282, 1)
end

function spell2_30180(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(15242,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30180', 3000, 1)
end

function spell3_30180(pUnit, Event) --@Frost Armor,Self--
pUnit:FullCastSpellOnTarget(18100,pUnit)
pUnit:RegisterEvent('Sorts_30180', 0, 1)
end

function Sorts_30180(pUnit, Event)
local choix_sorts_30180 = math.random(0, 3)
if choix_sorts_30180 == 0 then
pUnit:RegisterEvent('spell0_30180', 1, 1)
end
if choix_sorts_30180 == 1 then
pUnit:RegisterEvent('spell1_30180', 1, 1)
end
if choix_sorts_30180 == 2 then
pUnit:RegisterEvent('spell2_30180', 1, 1)
end
if choix_sorts_30180 == 3 then
pUnit:RegisterEvent('spell3_30180', 1, 1)
end
end

function mob30180_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30180', math.random(1500, 3000), 1)
end

function mob30180_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30180_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30180_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30180, 1, 'mob30180_Action')
RegisterUnitEvent(30180, 2, 'mob30180_Leave')
RegisterUnitEvent(30180, 3, 'mob30180_Kill')
RegisterUnitEvent(30180, 4, 'mob30180_Die')
